<?php


namespace App\Transformers\Member;


use League\Fractal\TransformerAbstract;

class  MemberRightTransFormer extends TransformerAbstract
{
    public function transform($data)
    {
    return [
         'id'=>$data->id,
         'right_type' =>$data->right_type ?? '',
         'right_title' =>$data->right_title ?? '',
         'show_title' =>$data->show_title ?? '',
         'image' =>$data->image ?? '',
         'explain' =>$data->explain ?? '',
         'sort' =>$data->sort ?? '',
         'status' =>$data->status ?? '',
         'created_at' => $data->created_at ? $data->created_at->format("Y-m-d H:i:s") : '',
         'updated_at' => $data->updated_at ? $data->updated_at->format("Y-m-d H:i:s") : '',
    ];

    }


}
